﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true"
    CodeBehind="CustomerList.aspx.cs" Inherits="Microsoft.JCI.Portal.BaseManage.CustomerList"
    StylesheetTheme="GlobleTheme" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">

    <script src="../Content/global.js" type="text/javascript"></script>

    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" />

    <script src="../Content/Grid/map_grid.js" type="text/javascript"></script>

    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <div class="Container">
        <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0"
                            width="100%" height="100%">
                            <colgroup>
                                <col>
                                <col width="60">
                                <col width="60">
                                <tr>
                                    <td style="color: #ffffff">
                                        <b>快速查询</b>
                                    </td>
                                    <td class="icMenu mnuRight" nowrap>
                                    </td>
                                </tr>
                        </table>
                    </td>
                </tr>
                <tr id="__appFind_trQuery" height="40">
                    <td class="wizBox1" colspan="7">
                        <table id="__appFind_tbQuery2" style="table-layout: fixed; font-size: 9pt" cellspacing="2"
                            cellpadding="2" width="100%">
                            <colgroup>
                                <col width="80">
                                <col>
                                <col width="80">
                                <col>
                            </colgroup>
                            <tr>
                                <td width="25%">
                                    &nbsp;&nbsp;客户名称
                                </td>
                                <td width="25%">
                                    <asp:TextBox ID="txtCusterName" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                                <td width="20%">
                                    &nbsp;&nbsp;客户类别
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddCustomerType">
                                        <asp:ListItem Value="" Text="..." Selected="True"></asp:ListItem>
                                        <asp:ListItem Value="0" Text="个人客户"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="公司客户"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="楼盘"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;客户地址
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCustomerAddress" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;客户手机
                                </td>
                                <td>
                                    <asp:TextBox ID="txtMobile" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;家庭电话
                                </td>
                                <td>
                                    <asp:TextBox ID="txtHomePhone" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;办公室电话
                                </td>
                                <td>
                                    <asp:TextBox ID="txtOfficePhone" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;邮件地址
                                </td>
                                <td>
                                    <asp:TextBox ID="txtEmail" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;
                                </td>
                                <td>
                                    &nbsp;&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" align="right">
                                    <asp:Button ID="btnSearch" runat="server" Text="查找" CssClass="button" OnClick="btnSearch_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="Container">
        <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>单据列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                    </td>
                </tr>
            </tbody>
        </table>
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
        <rad:RadGrid runat="server" ID="radGridCustomerList"   GridLines="None"
        AllowPaging="True" PageSize="10" AllowSorting="True" AutoGenerateColumns="False"
           OnItemDeleted="RadGrid1_ItemDeleted" EnableAJAX="true"
        OnItemInserted="RadGrid1_ItemInserted" OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand"
         OnNeedDataSource="radGridCustomerList_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated">
            <ClientSettings EnableClientKeyValues="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView   CommandItemDisplay="Bottom" CommandItemSettings-RefreshText="刷新" CommandItemSettings-AddNewRecordText="添加新记录"  >
                <Columns>
                    <rad:GridBoundColumn HeaderText="公司名称" DataField="Name">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="公司类型" DataField="Type">
                    </rad:GridBoundColumn>
                     <rad:GridBoundColumn HeaderText="省份" DataField="Province">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="城市" DataField="City">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="区县乡" DataField="Country">
                    </rad:GridBoundColumn>
                     <rad:GridBoundColumn HeaderText="区域" DataField="AreaCode">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="性别" DataField="Gender">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="地址" DataField="Address">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="手机" DataField="Mobile">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="家庭电话" DataField="HomePhone">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="办公室电话" DataField="OfficePhone">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="电子邮件地址" DataField="Email">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn HeaderText="邮编" DataField="PostCode">
                    </rad:GridBoundColumn>
                   <rad:GridBoundColumn HeaderText="备注" DataField="Remark">
                    </rad:GridBoundColumn>
                                   
                    <rad:GridEditCommandColumn EditText="编辑">
                    
                </rad:GridEditCommandColumn >
                
                <rad:GridTemplateColumn>
                <ItemTemplate>
                <asp:LinkButton runat="server" CommandName="Delete" Text="删除"></asp:LinkButton>
                </ItemTemplate>
                </rad:GridTemplateColumn>
                </Columns>
                <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <table  width="100%">
                             
                            <tr>
                                <td width="20%">
                                    &nbsp;&nbsp;客户名称
                                </td>
                                <td width="20%">
                                    <asp:TextBox ID="CusterName" runat="server" CssClass="input" Text='<%# Bind("Name") %>'></asp:TextBox>
                                </td>
                                <td width="20%">
                                    &nbsp;&nbsp;客户类别
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddCustomerType" Width="200px" SelectedValue='<%# Bind("Type") %>'>
                                        <asp:ListItem Value="" Text="..." Selected="True"></asp:ListItem>
                                        <asp:ListItem Value="0" Text="个人客户"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="公司客户"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="楼盘"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;客户地址
                                </td>
                                <td>
                                    <asp:TextBox ID="CustomerAddress" runat="server" CssClass="input"  Text='<%# Bind("Address") %>'></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;客户手机
                                </td>
                                <td>
                                    <asp:TextBox ID="Mobile" runat="server" CssClass="input" Text='<%# Bind("Mobile") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;家庭电话
                                </td>
                                <td>
                                    <asp:TextBox ID="txtHomePhone" runat="server" CssClass="input" Text='<%# Bind("HomePhone") %>'></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;办公室电话
                                </td>
                                <td>
                                    <asp:TextBox ID="txtOfficePhone" runat="server" CssClass="input" Text="OfficePhone"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;邮件地址
                                </td>
                                <td>
                                    <asp:TextBox ID="Email" runat="server" CssClass="input"  Text='<%# Bind("Email") %>'></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;邮政编码
                                </td>
                                <td>
                                    <asp:TextBox ID="ZipCode" runat="server" CssClass="input" Text='<%# Bind("PostCode") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;省份
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddProvince" runat="server" Width="200px" ></asp:DropDownList>
                                     
                                </td>
                                <td>
                                    &nbsp;&nbsp;城市
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddCity" runat="server" Width="200px"   ></asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;区县乡
                                </td>
                                <td>
                                    <asp:TextBox ID="County" runat="server" CssClass="input" Text='<%# Bind("Country") %>'></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;备注
                                </td>
                                <td>
                                    <asp:TextBox ID="Remark" runat="server" CssClass="input" Text='<%# Bind("Remark") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;&nbsp;性别
                                </td>
                                <td>
                                    <asp:RadioButtonList runat="server" ID="Gender"  RepeatDirection="Horizontal" >
                                        <asp:ListItem Text="男" Value = "1" Selected="True">
                                        </asp:ListItem>
                                        <asp:ListItem Text="女" Value = "0">
                                        </asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td>
                                    &nbsp;&nbsp;
                                </td>
                                <td>
                                    &nbsp;&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right" colspan="4">
                                   <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CssClass="button" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button>&nbsp;
<asp:Button CssClass="button" ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>

                                </td>
                                
                            </tr>
                        </table>
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
        </rad:RadGrid>
    </div>
</asp:Content>
